$primary-color = #409EFF;
$primary-background-color = #ecf5ff;
// 表单设计器容器
.fm-container {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  box-sizing: border-box;
  background-color: #fff;
  padding: 0;
  color: rgba(0, 0, 0, 0.65);
  font-size: 14px;
  font-variant: tabular-nums;
  line-height: 1.5715;
  z-index: 1000;
  .fm-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    color: #f0f0f0;
    height: 50px;
    -webkit-box-shadow: 0 2px 10px rgba(70, 160, 252, 0.6);
    box-shadow: 0 2px 10px rgba(70, 160, 252, 0.6);
    padding: 16px;
    background-image: -webkit-gradient(linear, left top, right top, from(#1278f6), to(#00b4aa));
    background-image: linear-gradient(to right, #1278f6, #00b4aa);
    .title {
      display: inline-flex;
      align-items: center;
      width: 90%;
      font-weight: 500;
      line-height: 50px;
      overflow: hidden;
      text-overflow: ellipsis;
      color: #f0f0f0;
      white-space: nowrap;
      .logo {
        font-size: 28px;
        font-weight: bold;
        background: linear-gradient(to right, red, yellow);
        -webkit-background-clip: text;
        color: transparent;
        margin-right: 8px;
      }
    }
    .right {
      display: flex;
      align-items: center
      .iconfont {
        font-size: 22px;
        cursor: pointer;
        color: #f0f0f0;
        border-radius: 50%;
      }
      .icon-close {
        padding: 4px;
        font-size: 16px;
        &:hover {
          color: #ffffff;
          background: #ff7072;
        }
      }
    }
  }
  .fm-content {
    width: 100%;
    height: calc(100% - 50px);
    display: flex;
  }
  .components-list {
    width: 250px;
    height: 100%;
    padding: 8px 0;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .center-container {
    width: calc(100% - 630px);
    height: 100%;
    overflow: hidden;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    .top-fix {
      height: 45px;
      line-height: 45px;
      text-align: right;
      padding: 0 16px;
      border-bottom: 2px solid #e0e0e0;
    }
    .scroll-content {
      height: calc(100% - 45px);
      position: relative;
      background: #fafafa;
      overflow-y: auto;
      overflow-x: hidden;
    }
  }
  .right-config-container {
    width: 380px;
    height: 100%;
    .config-panel {
      height: 100%;
    }
    .top-fix {
      height: 45px;
      line-height: 45px;
      display: flex;
      border-bottom: 2px solid #e4e7ed;
      padding: 0 5px;
      .tab-item {
        position: relative;
        width: 50%;
        text-align: center;
        transition: background .2s;
        cursor: pointer;
        height: 45px;
        line-height: 45px;
        font-size: 14px;
        font-weight: 500;
        &.active {
          border-bottom: solid 2px #409EFF;
        }
      }
    }
    .config-content {
      width: 100%;
      height: calc(100% - 45px);
      overflow-y: auto;
      overflow-x: hidden;
      .bin-form-label-top .bin-form-item-label:after {
        content: unset;
      }
      .bin-form-item-content {
        position: relative;
      }
      .bin-form-item {
        margin-bottom: 17px;
      }
    }
  }
}
// 左侧组件样式
.components-list {
  .widget-cate {
    padding: 8px 12px;
    font-size: 13px;
  }
  ul {
    position: relative;
    overflow: hidden;
    padding: 0 10px 10px;
    margin: 0;
  }
  .form-edit-widget-label {
    font-size: 12px;
    display: block;
    width: 48%;
    line-height: 26px;
    position: relative;
    float: left;
    left: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 1%;
    color: rgba(0, 0, 0, .65);
    border: 1px solid #f6f7ff;

    &:hover {
      color: $primary-color;
      border: 1px dashed $primary-color;
    }

    & > a {
      display: block;
      cursor: move;
      background: #f6f7ff;
      border: 1px solid #f6f7ff;
      color: rgba(0, 0, 0, .65);
      .iconfont {
        margin-right: 6px;
        margin-left: 8px;
        font-size: 14px;
        display: inline-block;
        vertical-align: middle;
      }
      span {
        display: inline-block;
        vertical-align: middle;
      }
      &:hover {
        color: $primary-color;
      }
    }
  }
}
// 中间表单容器
.widget-form-container {
  // 中间拖拽元素的样式
  .widget-form-list {
    background: #fff;
    border: 1px dashed #999;
    min-height: 600px;
    margin: 12px;
    transition: .25s;
    .widget-view {
      padding: 2px 2px 18px;
      position: relative;
      border: 1px dashed rgba(170, 170, 170, 0.7);
      background-color: rgba(236, 245, 255, .3);
      margin: 2px;
      &:hover {
        background: $primary-background-color;
        border: 1px solid $primary-color;
        &.active {
          outline: 1px solid $primary-color;
          border: 1px solid $primary-color;
          outline-offset: 0;
        }
        .widget-view-drag {
          display: block;
        }
      }
      &:after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        z-index: 8;
        display: block;
      }
      .widget-view-action {
        position: absolute;
        right: 1px;
        bottom: 1px;
        height: 26px;
        line-height: 26px;
        z-index: 9;
        i {
          cursor: pointer;
          display: inline-block;
          width: 22px;
          height: 22px;
          line-height: 22px;
          text-align: center;
          font-size: 12px;
          border-radius: 50%;
          border: 1px solid $primary-color;
          color: $primary-color;
          background-color: #fff;
          transition: .3s;
          &:hover {
            border: 1px solid $primary-color;
            background-color: $primary-color;
            color: #ffffff;
          }
          &.icon-ios-trash {
            font-size: 14px;
            margin-left: 5px;
            border: 1px solid #ff4d4f;
            color: #ff4d4f;
            &:hover {
              border: 1px solid #ff4d4f;
              background-color: #ff4d4f;
              color: #ffffff;
            }
          }

        }
      }
      .widget-view-drag {
        position: absolute;
        left: -1px;
        top: -1px;
        height: 24px;
        line-height: 24px;
        background: $primary-color;
        z-index: 9;
        i {
          font-size: 16px;
          color: #fff;
          margin: 0 4px;
          vertical-align: -1px;
          cursor: move;
        }
      }
      .widget-view-field-name {
        position: absolute;
        top: 2px;
        right: 4px;
        font-size: 12px;
        color: #67c23a;
        z-index: 9;
        font-weight: 500;
      }
      &.active {
        outline: 1px solid $primary-color;
        border: 1px solid $primary-color;
      }
      &.ghost {
        background: #F56C6C;
        border: 2px solid #F56C6C;
        outline-width: 0;
        height: 3px;
        box-sizing: border-box;
        font-size: 0;
        content: '';
        overflow: hidden;
        padding: 0;
      }
    }

    .widget-col {
      padding: 5px;
      background-color: rgba(253, 246, 236, .3);

      &.active {
        outline: 1px solid #fea638;
        border: 1px solid #fea638;
      }

      &:hover {
        background: #fdf6ec;
        border: 1px solid #fea638;

        &.active {
          outline: 1px solid #fea638;
          border: 1px solid #fea638;
          outline-offset: 0;
        }
      }

      .bin-col {
        min-height: 50px;
      }

      &.ghost {
        background: #F56C6C;
        border: 2px solid #F56C6C;
        outline-width: 0;
        height: 3px;
        box-sizing: border-box;
        font-size: 0;
        content: '';
        overflow: hidden;
        padding: 0;
      }

      .widget-view-drag.widget-col-drag {
        background: #fea638;
      }

      &::after {
        display: none;
      }
    }

    .widget-col-list {
      min-height: 50px;
      border: 1px dashed #ccc;
      background: #fff;
    }
  }
  // 拖拽进入面板的样式显示
  .ghost {
    background: #F56C6C;
    border: 2px solid #F56C6C;
    position: relative;
    &::after {
      background: #F56C6C;
    }
  }

  li.ghost {
    height: 3px;
    list-style: none;
    font-size: 0;
    overflow: hidden;
  }
  // 覆盖ui
  .bin-form .bin-form-item-content {
    position: unset;
  }
}

// 右侧配置面板
.widget-config-container {
  position: relative;
  .form-config-item {
    padding: 4px 12px 0;
    .bin-checkbox-wrapper {
      width: 120px;
      margin-right: 24px;
      height: 28px;
    }
    .bin-form-item-label::after {
      content: unset;
    }
  }
  .validate-block {
    .message-input {
      padding-left: 24px;
      + .message-input {
        margin-top: 8px;
      }
    }
    .input-label {
      color: #647279;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      font-size: 13px;
      line-height: 18px;
      padding-bottom: 2px;
      text-align: left;
    }
    .rules-item {
      position: relative;
      background: #fff;
      margin-bottom: -1px;
      border: 1px solid rgba(0, 0, 0, 0.125);
      .title-wrap {
        display: flex;
        justify-content: space-between;
        align-items: center;
        .title-label {
          padding: 0 4px;
          color: #0d85ff;
          line-height: 26px;
          .icon-ios-options {
            font-size: 18px;
            margin-right: 4px;
            cursor: move;
            vertical-align: -1px;
            color: #333;
          }
        }
      }
      .params {
        padding: 4px;
        .info {
          display: flex;
          padding-left: 24px;
          margin-bottom: 8px;
          .inline {
            + .inline {
              margin-left: 5px;
            }
          }
        }
      }
      &.ghost {
        background: #fff;
        box-shadow: inset 0 0 20px 1px $primary-color;
        font-size: 14px;
        &::after {
          content: unset;
        }
      }
    }
    + .validate-block {
      margin-top: 10px;
    }
  }
  .ghost {
    background: #fff;
    border: 1px dashed $primary-color;
    &::after {
      background: #fff;
      display: block;
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
    }
  }
  ul {
    margin: 0;
    padding: 0;
  }

  .drag-li {
    padding: 4px 0;
    &.ghost {
      list-style: none;
      font-size: 0;
      display: block;
      position: relative;
    }
  }
}
.form-config-container {
  .form-config-item {
    padding: 4px 12px 0;
    .bin-form-item {
      margin-bottom: 20px !important;
      .bin-form-item-label::after {
        content: unset;
      }
    }
  }
}
// 空容器
.form-empty {
  position: absolute;
  text-align: center;
  height: 20px;
  font-size: 20px;
  top: 200px;
  width: 100%;
  color: #ccc;
}

.fm-container, .fm-style {
  .bin-scrollbar__wrap {
    overflow-x: hidden;
  }
}
